// Copyright 2012 Christoffer Anselm (DaDummy).
//
// This file is part of OpenMYP.
//
// OpenMYP is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// OpenMYP is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with OpenMyp.  If not, see <http://www.gnu.org/licenses/>.
//

#ifndef OPENMYP_HASH_BJHASHLITTLE2_H_
#define OPENMYP_HASH_BJHASHLITTLE2_H_

#include "openmyp.h"

#include <string>

namespace openmyp {

class BJHashLittle2
{
public:
	// hash a multibyte (utf-8) string
	static bool HashUTF8(const std::string& path, uint32_t* ph, uint32_t* sh);
	// hash a multibyte (utf-8) string
	static bool HashUTF8(const char* path, size_t len, uint32_t* ph, uint32_t* sh);
		
	// hash a unicode (wide char) string
	static bool HashW(const std::wstring& path, uint32_t* ph, uint32_t* sh);
	// hash a unicode (wide char) string
	static bool HashW(const wchar_t* path, size_t len, uint32_t* ph, uint32_t* sh);

private:
	// static only class for now
	BJHashLittle2();
	~BJHashLittle2();
	DISALLOW_COPY_AND_ASSIGN(BJHashLittle2);
};

}

#endif // OPENMYP_HASH_BJHASHLITTLE2_H_